import request from '@/utils/request'

// 查询用户列表
export function getUserList(data) {
    return request({
        url: '/system/block/user/list',
        method: 'post',
        data: data
    })
}
// 新增用户信息
export function addUser(data) {
    return request({
        url: '/system/block/user/addUser',
        method: 'post',
        data: data
    })
}
// 编辑用户信息
export function editUser(data) {
    return request({
        url: '/system/block/user/editUser',
        method: 'put',
        data: data
    })
}
// 编辑用户状态
export function editUserStatus(data) {
    return request({
        url: '/system/block/user/editUserStatus',
        method: 'put',
        data: data
    })
}
// 删除用户信息
export function deleteUser(userId) {
    return request({
        url: '/system/block/user/deleteUser/' + userId,
        method: 'delete'
    })
}
// 重置用户密码
export function resetUserPwd(data) {
    return request({
        url: '/system/block/user/resetUserPwd',
        method: 'put',
        data: data
    })
}
// 查询用户分配的角色id列表
export function getUserRoleIdList(userId) {
    return request({
        url: '/system/block/user/getUserRoleIdList/' + userId,
        method: 'get'
    })
}
// 用户分配角色
export function setUserRole(data) {
    return request({
        url: '/system/block/user/setUserRole',
        method: 'put',
        data: data
    })
}
